//
//  XTXXiaoxiCell.m
//  xiaotianxin
//
//  Created by XYC on 2019/6/11.
//  Copyright © 2019 XYC. All rights reserved.
//

#import "XTXXiaoxiCell.h"

@implementation XTXXiaoxiCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
    
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
    if ([@"系统通知" isEqualToString:self.chatModel.nickname] || [@"互动通知" isEqualToString:self.chatModel.nickname]) {
        self.xitongImageView.image = [UIImage imageNamed:self.chatModel.headimage];
        self.layoutConst.constant = 15;
    }
    else {
        [self.xitongImageView sd_setImageWithURL:[NSURL URLWithString:self.chatModel.headimage]];
    }

    self.nichengLabel.text = self.chatModel.nickname;
    self.xiaoxiLabel.text = self.chatModel.message;
    
    if (self.chatModel.sex.integerValue) {
        self.xingbieImageView.image = [UIImage imageNamed:@"详情-男性图标"];
    }
    else {
        self.xingbieImageView.image = [UIImage imageNamed:@"详情-女生图标"];
    }
}

@end
